"Colin's main gvimrc

if ($VIMRC != '')
   "Source useful settings for use of taglist plugin
   source $VIMRC/gui_taglist.vim
else
   echoerr "WARNING: \$VIMRC is not defined! Other gvimrc files not sourced!"
endif

"GUI options: Autoselect, vim Icon
set guioptions=aie
"Choose a nice looking font and font size
if has("win32") " If we're running on windows
   "Windows font selection
   set guifont=Courier_New:h10:cANSI
else
   "Unix font selection
   set guifont=Screen\ 12
   "This font isn't great, colorscheme makes it look better though
   colorscheme colin
   "Add console dialogs if not using windows
   set guioptions+=c
endif

"GUI size (set wide if running a diff)
set lines=60
if &diff
   if (argc() > 2)
      "not sure why this doesn't work:
      "simalt ~x
      "workaround:
      set columns=182
      set lines=65
   else
      set columns=161
   endif
   "Also set the colorscheme to what works well for diff mode
   "Note, I think this was causing problems with vim 7.0 diffing
   "colorscheme default
   " Vim 7.0 diff output doesn't look very good with default colorscheme
   colorscheme desert
else
   set columns=80
endif
"If we end up saving a GUI session, also save the size and location of the gvim
set sessionoptions+=resize,winpos

"Why GUI if not using color syntax highlighting?
syntax enable
"Hide the mouse when characters are typed
set mousehide
"visual bell (instead of beep), with no screen flashing
"(note: this is in my vimrc too, but it doesn't seem to take affect the first
"       time unless it is also in the gvimrc)
set vb t_vb=
"Always show a status line, even with a single window
"set laststatus=2

"my wide mode - double screen width; also ready a vertical command (complete
"manually to :vnew or :vsplit <some file>, etc., or just hit escape.)
nmap ,w :set columns=161<CR>:v
"my normal width mode
"nmap ,n :set columns=80<CR>
nmap ,n :vertical resize 80<CR>
nmap ,b :vertical resize 104<CR>

"pop up font selection dialog box
command! FontSelect :set guifont=*

